package web;

import factories.BeanFactory;
import factories.BeanFactory_JDKProxy;
import service.UserService;
import service.impl.UserServiceImpl1;

public class UserController {

    //在web层中通过new的方式，获取service的对象
//    private static UserService userService = new UserServiceImpl2();

    //通过工厂获取想要的对象
    private static UserService userService = (UserService) BeanFactory_JDKProxy.getBean("userService");

    public static void main(String[] args) {
//        System.out.println(userService);

        userService.findAll();
    }
}
